package com.example.activemq;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;
/**
 * 目前不能同时支持2种方式坑
 * 
 * @author lli 
 *
 * @version 1.0
 *
 */
@Component
public class Consumer {

    @JmsListener(destination = "sample.queue")
    public void receiveQueue(String text) {
        System.out.println("11111-------" + text);
    }

    @JmsListener(destination = "sample.queue")
    public void receiveQueue2(String text) {
        System.out.println("22222--------" + text);
    }

    @JmsListener(destination = "sample.topic")
    public void receiveTopic1(String text) {
        System.out.println("22222--------" + text);
    }

    @JmsListener(destination = "sample.topic")
    public void receiveTopic2(String text) {
        System.out.println("22222--------" + text);
    }
}